Skip to content

Conversation

@RivaIvanova
Copy link
Member

Closes #16273

Additional information (check all that apply):

  • Bug fix
  • New functionality
  • Documentation
  • Demos
  • CI/CD

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code (test guidelines)
  • This PR includes API docs for newly added methods/properties (api docs guidelines)
  • This PR includes feature/README.MD updates for the feature docs
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes ng update migrations for the breaking changes (migrations guidelines)
  • This PR includes behavioral changes and the feature specification has been updated with them

@RivaIvanova RivaIvanova requested review from ChronosSF and removed request for gedinakova October 13, 2025 08:01
@ChronosSF ChronosSF requested a review from Copilot October 20, 2025 06:29
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes an SSR (Server-Side Rendering) issue by deferring tooltip arrow creation until after view initialization, ensuring it only happens in browser environments. The fix prevents errors when rendering tooltips on the server where DOM manipulation is not available.

  • Moved arrow creation from constructor to ngAfterViewInit with browser environment check
  • Updated tooltip target to handle cases where arrow may not exist yet
  • Updated test assertions to reflect new DOM structure (arrow element is now at index 0 instead of 1)

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.

File Description
projects/igniteui-angular/src/lib/directives/tooltip/tooltip.directive.ts Deferred arrow creation to ngAfterViewInit with platform check to prevent SSR issues
projects/igniteui-angular/src/lib/directives/tooltip/tooltip-target.directive.ts Added null checks for arrow element and moved arrow visibility logic to ngAfterViewInit
projects/igniteui-angular/src/lib/grids/grid/grid-validation.spec.ts Updated test assertions to access error message from correct DOM child index

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@IvanKitanov17 IvanKitanov17 added 💥 status: in-test PRs currently being tested ✅ status: verified Applies to PRs that have passed manual verification and removed ❌ status: awaiting-test PRs awaiting manual verification 💥 status: in-test PRs currently being tested labels Oct 21, 2025
@kacheshmarova kacheshmarova merged commit 3e0985a into 20.1.x Oct 23, 2025
6 checks passed
@kacheshmarova kacheshmarova deleted the rivanova/fix-16273-20.1.x branch October 23, 2025 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

angular: ssr tooltip version: 20.1.x ✅ status: verified Applies to PRs that have passed manual verification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tooltip directive has pure document usage causing SSR to throw an error

5 participants